package com.intramirror.wd.frontendAppserver.controller;


import com.intramirror.wd.common.bean.R;
import com.intramirror.wd.model.test.Person;
import com.intramirror.wd.model.test.TestBean;
import com.intramirror.wd.spi.TestInterface;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api("test")
@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    private TestInterface service;
    @GetMapping("/helloworld")
    public R<Person> hello(@RequestParam String name){

        int age =0;
        TestBean bean = new TestBean();
        bean.setB(age);
        bean.setA(name);
        R<Person> r =  service.helloWorld(bean);

        return r;

    }

}
